//
//  SEGNewBillManager.h
//  SEGUhomePropertyBaseService
//
//  Created by Clavis on 2019/2/26.
//  Copyright © 2019 刘山. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SEGBillMonthModel.h"
#import "SEGOwesDisFeeModel.h"
#import "SEGBillFeeItemModel.h"
#import "SEGBillPaymentDiscInfoModel.h"
#import "SEGPayLogModel.h"
#import "SEGOwesBillDetailModel.h"

NS_ASSUME_NONNULL_BEGIN

@interface SEGNewBillManager : NSObject

@property (nonatomic, assign) CGFloat oweAmount; ///< 总的欠费金额
@property (nonatomic, strong) NSMutableDictionary<NSNumber *, NSMutableArray<SEGBillMonthModel *>*> *billYearDic; ///< 查询账单时的数据
@property (nonatomic, strong) NSArray<NSNumber *> *allYears; ///< 账单查询总的年份
@property (nonatomic, strong) NSMutableArray<SEGOwesDisFeeModel *> *discountArray; ///< 预缴选择优惠的数据
@property (nonatomic, strong) NSMutableArray<SEGBillFeeItemModel *> *feeItemArray; ///< 预缴选择科目的数据
@property (nonatomic, strong) NSMutableArray<SEGBillMonthModel *> *billMonthsArray; ///< 缴费时预缴和欠费的数据
@property (nonatomic, strong) NSMutableArray<SEGBillPaymentDiscInfoModel *> *payDiscountInfoArray; ///< 缴费时的优惠信息数组
@property (nonatomic, strong, nullable) SEGOwesDisFeeModel *payDiscount; ///< 缴费可用的优惠
@property (nonatomic, strong) NSArray<SEGPayLogModel*> * payRecodeModels; ///< 缴费记录列表
@property (nonatomic, strong) NSArray<SEGOwesBillDetailModel*>* recordDetailModels; ///< 缴费详情列表数据

/**
 请求全部的欠费账单列表
 
 @param params 参数
 @param finished 回调
 */
- (void)requestOweBillListWithParamsDic:(NSDictionary *)params finished:(SEGRequestCallBack)finished;

/**
 请求指定月份范围账单列表
 
 @param params 可传查询的日期范围
 @param finished 回调处理
 */
- (void)requestBillListWithParamsDic:(NSDictionary *)params finished:(SEGRequestCallBack)finished;

/**
 查询预缴规则
 
 @param params 参数
 @param finished 回调
 */
- (void)requestDiscountRuleWithParamsDic:(NSDictionary *)params finished:(SEGRequestCallBack)finished;

/**
 查询预缴账单
 
 @param params 参数
 @param finished 回调
 */
- (void)requestFutureBillListWithParamsDic:(NSDictionary *)params finished:(SEGRequestCallBack)finished;

/**
 查询缴费账单（和全部欠费的接口一致但数据结构不同）
 
 @param params 参数
 @param finished 回调
 */
- (void)requestPaymentBillListWithParamsDic:(NSDictionary *)params finished:(SEGRequestCallBack)finished;

/**
 查询匹配的缴费优惠信息
 
 @param params 参数
 @param finished 回调
 */
- (void)requestMatchDiscountWithParamsDic:(NSDictionary *)params finished:(SEGRequestCallBack)finished;

/**
 请求缴费记录
 
 @param paramas 参数
 @param finished 回调
 */
- (void)requestBillPaymentRecoed:(NSDictionary *)paramas finished:(SEGRequestCallBack)finished;

/**
 请求缴费记录详情
 
 @param paramas 参数
 @param finished 回调
 */
- (void)requestBillPaymentRecoedDetail:(NSDictionary *)paramas finished:(SEGRequestCallBack)finished;

/**
 请求支付方式列表
 
 @param finished 回调处理
 */
- (void)requestBillPaymentMethodListFinished:(SEGNetworkReponse)finished;

/**
 轮询支付方式列表（费用缴纳）
 
 @param paramas 参数
 @param finished 回调
 */
- (void)requestPollByPayMethodResultWithParamsDic:(NSDictionary*)paramas
                                         Finished:(SEGNetworkReponse)finished;

/**
 *  查询无纸化账单配置
 *
 *  @param finished 网络请求完成后的操作
 */
- (void)checkNoPaper:(NSDictionary*)params finished:(SEGNetworkReponse)finished;

/**
 *  无纸化账单设置
 *
 *  @param finished 网络请求完成后的操作
 */
- (void)dealNoPaper:(NSDictionary*)params finished:(SEGNetworkReponse)finished;

/**
 计算时间
 
 @param intevalMonth 时间间隔的月份
 @return 计算的时间
 */
+ (NSString *)calculateTimeBeseNowWithIntervalMonth:(NSInteger)intevalMonth;

/**
 时间间隔的月份
 
 @param baseTime 基于哪个时间
 @param intevalMonth 时间间隔的月份
 @return 计算的时间
 */
+ (NSString *)calculateTimeBase:(NSString *)baseTime intervalMonth:(NSInteger)intevalMonth;

/**
 当前日期转String
 
 @return 当前日期转String
 */
+ (NSString *)currentTimeString;

@end

NS_ASSUME_NONNULL_END
